﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:baselib="clr-namespace:ETRoboConTrakingSystem;assembly=ETRoboConTrakingSystem"
    xmlns:src="clr-namespace:ETRobocon.RaceTraking.GamePresentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" 
    x:Class="ETRobocon.RaceTraking.GamePresentation.UserControlPresentationMain"
    Height="768" Width="1024" 
	Background="{DynamicResource MainBackgroundImage}">
	
    <UserControl.Resources>
    	<ResourceDictionary>
    		<ResourceDictionary.MergedDictionaries>
    			<ResourceDictionary Source="Styles/ResourceDictionary.xaml"/>
    		</ResourceDictionary.MergedDictionaries>
    		<Style x:Key="RaceInfoLabel" TargetType="{x:Type Label}">
    			<Setter  Property="FontSize" Value="48"/>
    			<Setter Property="Foreground" Value="White"/>
    		</Style>
    		<Style x:Key="RaceInfoTextBlock" TargetType="{x:Type TextBlock}">
    			<Setter  Property="FontSize" Value="48"/>
    			<Setter Property="Foreground" Value="White"/>
    		</Style>
    		<baselib:RoundInfo x:Key="CurrentRoundInfo"/>
    	</ResourceDictionary>
    </UserControl.Resources>
	
    <Grid DataContext="{Binding Source={StaticResource CurrentRoundInfo}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="78"/>
            <RowDefinition Height="122"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <DockPanel Grid.Row="0">
        	<Label FontSize="48" FontFamily="{DynamicResource MainFont}" Foreground="{DynamicResource FontColorBrush04}" Content="{Binding GameName}" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        </DockPanel>
    	<Grid Grid.Row="1">
    		<Grid.ColumnDefinitions>
    			<ColumnDefinition Width="300"/>
    			<ColumnDefinition/>
    			<ColumnDefinition Width="500"/>
    		</Grid.ColumnDefinitions>
    		<DockPanel Grid.Column="0" >
    			<!--<Label DockPanel.Dock="Left" VerticalAlignment="Center" Style="{StaticResource RaceInfoLabel}" Effect="{DynamicResource DropShadowEffect01}" FontFamily="{DynamicResource MainFont}" >ラウンド:</Label>-->
    			<TextBlock x:Name="textBoxRoundNo" Text="{Binding RoundNo}" DockPanel.Dock="Right" VerticalAlignment="Center" Style="{StaticResource RaceInfoTextBlock}" FontFamily="{DynamicResource MainFont}" Margin="0,0,30,0" TextAlignment="Right" FontWeight="Bold" Foreground="#FFFFC600" FontSize="48" />
    		</DockPanel>
    		<DockPanel Grid.Column="1">
    			<!--<Label DockPanel.Dock="Left" VerticalAlignment="Center" Style="{StaticResource RaceInfoLabel}" Effect="{DynamicResource DropShadowEffect01}" >ターン:</Label>-->
    			<TextBlock x:Name="textBoxTurnNo" Text="{Binding TurnNo}" DockPanel.Dock="Right" VerticalAlignment="Center"  Style="{StaticResource RaceInfoTextBlock}" FontFamily="{DynamicResource MainFont}" Margin="0,0,30,0" FontWeight="Bold" TextAlignment="Right" Foreground="{DynamicResource FontColorBrush05}" FontSize="48" />
    		</DockPanel>
    		<DockPanel Grid.Column="2" x:Name="mainTimerControlPanel">
    			<src:UserControlTimeCounter x:Name="mainTimeConter" VerticalAlignment="Center" HorizontalAlignment="Left" Loaded="mainTimeConter_Loaded" Margin="30,0,0,0" />
    		</DockPanel>
    	</Grid>
        <Grid Grid.Row="2" Margin="15,0,8,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="3"/>
				<ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Column="0">
                <src:UserControlRunnerStatus x:Name="InCourseRunnerStatus" CourseImageFile="InCourse2012.png" CourseImageOpachity="0.5"/>
            </StackPanel>
            <StackPanel Grid.Column="2">
                <src:UserControlRunnerStatus x:Name="OutCourseRunnerStatus" CourseImageFile="OutCourse2012.png" CourseImageOpachity="0.5"/>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
